package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.Attendance;
import com.itheima.pojo.WeeklyReport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WeeklyReportMapper extends BaseMapper<WeeklyReport> {

    @Select("SELECT weekly_report.*, u.nickname FROM weekly_report " +
            "LEFT JOIN user u ON weekly_report.member_id = u.id ")
    List<WeeklyReport> selectAttendanceWithNickname();
}
